1. Technical Field
Present invention embodiments relate to merging metadata describing database storage regions, and more specifically, to merging metadata describing database storage regions based on overlapping range values.
2. Discussion of the Related Art
Searching for information using a query may result in a search of a large database table when an evaluation of the query indicates that the large database table should be scanned. In such a situation, it may be beneficial to eliminate rows in the large database table from consideration early in the scanning sequence before an unnecessarily large processing overhead has been incurred. Some database management systems maintain metadata about each storage region in the form of range values or range maps that define minimum and maximum ranges in a given storage region in order to filter storage regions before actually reading and searching the stored data. For example, if a storage region is known to contain records with column values between 100 and 200 (e.g., as stored in the range map metadata), then when a query with range values outside of that known range (e.g., a query with a value of 500) is evaluated, the evaluation can eliminate that storage region.
The size of a given storage region for which metadata is maintained defines a resource tradeoff between processing resources and storage resources. For example, if the storage region is relatively large (e.g., three megabytes (MBs)), then a query that would otherwise return a relatively small data subset (e.g., 128 kilobytes (KBs) or 0.125 MB) requires loading the entire 3 MB storage region into memory for scanning, thereby increasing the use of memory resources, interconnect bandwidth from storage into memory, and storage device read bandwidth. If the scan region covered by the metadata is relatively small (e.g., 128 KB), then the volume of metadata becomes larger relative to the size of the metadata describing a 3 MB data storage region, thereby increasing the use of processing resources used to analyze a large amount of metadata.